package hn.cch.grammar.proxy;

/**
 * 静态代理
 */
public class StaticProxyImpl implements ProxyInterface {

    private ProxyInterface proxyInterface;

    public ProxyInterface getProxyInterface() {
        return proxyInterface;
    }

    public void setProxyInterface(ProxyInterface proxyInterface) {
        this.proxyInterface = proxyInterface;
    }

    @Override
    public String method(String string) {
        System.out.println("before:" + string);
        String result = proxyInterface.method(string);
        System.out.println("after:" + result);
        return result;
    }


}
